package com.ddm.controller.vx;

import com.ddm.result.Result;
import com.ddm.service.vxService.BonusPointService;
import com.ddm.vo.vxVo.ContestStatisticsVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/bonusponit")
@Api(tags = "用户积分相关接口")
@Slf4j
public class BonusPointsController {

    @Autowired
    private BonusPointService bonusPointService;

    @GetMapping("/contest-statistics")
    @ApiOperation("获取竞赛统计信息")
    public Result<ContestStatisticsVO> getContestStatistics() {
        log.info("获取竞赛统计信息");
        ContestStatisticsVO statistics = bonusPointService.getContestStatistics();
        return Result.success(statistics);
    }
} 